package com.github.itdachen.sdk.query;

import com.github.itdachen.framework.core.biz.BizQuery;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;


import java.io.Serializable;


/**
 * 代码生成业务表字段 查询参数
 *
 * @author 王大宸
 * @date 2023-09-23 21:25:55
 */
public class DevTableColumnQuery extends BizQuery implements Serializable {
    private static final long serialVersionUID = 1L;

            /** 归属表编号 */
            private String tableId;


    public DevTableColumnQuery() {
    }

    public DevTableColumnQuery(int page, int limit, String tableId) {
        super(page, limit);
            this.tableId = tableId;
    }

    public static DevTableColumnQueryBuilder builder() {
        return new DevTableColumnQueryBuilder();
    }

    public static class DevTableColumnQueryBuilder {
        private Integer page = 1;
        private Integer limit = 10;
            private String tableId;

        public DevTableColumnQueryBuilder() {
        }

        public DevTableColumnQueryBuilder page(Integer page) {
            this.page = page;
            return this;
        }

        public DevTableColumnQueryBuilder limit(Integer limit) {
            this.limit = limit;
            return this;
        }

            /* 归属表编号 */
            public DevTableColumnQueryBuilder tableId(String tableId) {
                this.tableId = tableId;
                return this;
            }

        public DevTableColumnQuery build() {
            return new DevTableColumnQuery(page, limit, tableId);
        }

    }




        public void setTableId(String tableId) {
            this.tableId = tableId;
        }

        public String getTableId() {
            return tableId;
        }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
        .append("page", getPage())
        .append("limit", getLimit())
                    .append("tableId", getTableId())
                .toString();
    }

}
